{~ dim key,k,prikey,begin}
{~ prikey = $prikey } {//定义一个变量，并将其值指向$prikey，下面的$item.__prikey__，最终解析为 tpl("item")(prikey) }
<table border="1" cellspacing="1">
<tr>
{foreach k as $value in $fields}
<th>{$value}</th>
{/foreach}
{if $prikey<>"" }
<th>修改</th>
{/if}
</tr>
{foreach key as $item in $list}
	<tr>
		{foreach k as $value in $fields}
		<td><% Response.write tpl("item")(tpl("value")) %></td>
		{/foreach}
		{if $prikey<>"" }
		<td width="200px" align="center">
		<a href="__URL__&a=listRecord&id={$item.__prikey__}">查看</a>
		|
		<a href="__URL__&a=editRecord&id={$item.__prikey__}">修改</a>
		|
		<a href="__URL__&a=deleteRecord&id={$item.__prikey__}">删除</a></td>
		{/if}
	</tr>
{/foreach}
</table>

<p>
<a href="__URL__&a=addRecord">添加</a>
{if $page<>""}
|
{$page}
{/if}
</p>